package com.demo.weather.packet.data;

import lombok.Getter;

/**
 * 功能码类型
 * 
 * @author tangheng
 */
public enum FunctionType {

	/** 实时监测 */
    REAL_TIME_MONITOR(0x030C);
    
	@Getter
    private int functionCode;

	private FunctionType(int functionCode) {
		this.functionCode = functionCode;
	}
	
	public static FunctionType valueOf(int functionCode) {
        for (FunctionType functionType : values()) {
            if (functionType.functionCode == functionCode) {
                return functionType;
            }
        }

        return null;
    }
}